/**
 * Created by Delicate on 2018/1/7.
 */
import React from 'react';
import {
    View,
} from 'react-native';

import NavBar from '../../components/NavBarView'
import ServerWeb from '../../components/ServerWebView'

let _self;

class Views extends React.Component {

    constructor(props) {
        super(props);
        _self = this;
        this.state = {
            url: this.props.navigation.state.params ? this.props.navigation.state.params.url : '',
            title: this.props.navigation.state.params ? this.props.navigation.state.params.title : ''
        }
    }

    componentWillMount() {

    }

    componentDidMount() {

    }

    render() {
        return (
            <View style={base.baseOuter}>
                <NavBar
                    host={this}
                    title={this.state.title}/>
                <ServerWeb fullUrl={this.state.url}/>
            </View>
        )
    }
}

//路由
const AdWebView = {
    screen: Views,
    navigationOptions: {
        header: null,
    },
    name: 'AdWebView',
    sign: false
};

export default AdWebView;